package com.yfp.operation.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Description: 用户类型
 *
 * @CreateDate: 2024/6/21 15:57
 * @UpdateUser:
 * @UpdateDate: 2024/6/21 15:57
 * @UpdateRemark: 暂无修改
 * @Version: 1.0
 */
@Getter
@AllArgsConstructor
public enum UserTypeEnums {
    SIGN_MERCHANT(1,"特约商户"),
    MERCHANT(2,"普通商户"),
    PERSON(3,"个人"),
    FACILITATOR(4,"服务商");

    public static UserTypeEnums getByType(Integer type){
        UserTypeEnums userTypeEnums = null;
        switch (type){
            case 1:
                userTypeEnums = UserTypeEnums.SIGN_MERCHANT;
                break;
            case 2:
                userTypeEnums = UserTypeEnums.MERCHANT;
                break;
            case 3:
                userTypeEnums = UserTypeEnums.PERSON;
                break;
            case 4:
                userTypeEnums = UserTypeEnums.FACILITATOR;
                break;
        }
        return userTypeEnums;
    }
    private Integer type;
    private String name;
}
